package design_pattern.abstract_factory;

public class ColorFactory extends AbstractFactory {


    @Override
    public Color getColor(String name){
        if(name==null) {
            return null;
        }
        if(name.equalsIgnoreCase("red")) {
            return new Red();
        }else if(name.equalsIgnoreCase("blue")){
            return new Blue();
        }else if(name.equalsIgnoreCase("green")){
            return new Green();
        }
        return null;
    }

    @Override
    public Shape getShape(String name) {
        return null;
    }
}
